package com.chance.cc.crawler.development.command.publish.bitauto;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.bitauto.*;
import com.chance.cc.crawler.development.command.script.bitauto.BitAutoWebCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.bitauto.BitAutoWebSchedulerTrigger;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2020-12-18 13:31:21
 * @email okprog@sina.com
 */
public class BitAutoPublishCrawlerJob {

    /**
     * 易车测试发布
     */
    @Test
    public void publishTestCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebHaoArticleTraceCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoTestCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
//        BitAutoWebCrawlerScript.publishCrawlerNodeScript();
    }

    /**
     * 易车新闻实时任务
     */
    @Test
    public void publishArticleCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebArticleCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoArticleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 易车新闻回溯三天回复任务
     */
    @Test
    public void publishArticleTraceCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebArticleTraceCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoArticleTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 易车视频实时任务
     */
    @Test
    public void publishVideoCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebVideoCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoVideoCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 易车视频回溯三天回复任务
     */
    @Test
    public void publishVideoTraceCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebVideoTraceCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoVideoTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }


    /**
     * 易车论坛最新发布实时任务
     */
    @Test
    public void publishForumReleaseCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebForumReleaseCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoForumReleaseCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 易车论坛回溯三天互动量任务
     */
    @Test
    public void publishForumInteractionCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebForumInteractionCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoForumInteractionCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 易车论坛最新回复定时任务
     */
    @Test
    public void publishForumReplyCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebForumReplyCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoForumReplyCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 易车口碑实时采集定时任务
     */
    @Test
    public void publishPraiseCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebPraiseCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoPraiseCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
    /**
     * 易车口碑回溯定时任务
     */
    @Test
    public void publishPraiseTraceCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebPraiseTraceCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoPraiseTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }


    /**
     * 易车号文章实时采集定时任务
     */
    @Test
    public void publishHaoArticleCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebHaoArticleCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoHaoArticleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }


    /**
     * 易车号文章回溯采集定时任务
     */
    @Test
    public void publishHaoArticleTraceCrawlerJob(){
        CrawlerJob crawlerJob = BitAutoWebHaoArticleTraceCrawlerSchedulerJob.publishBitAutoCrawlerSchedulerJobInfo();
        BitAutoWebSchedulerTrigger.publishBitAutoHaoArticleTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
}
